<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>属性绑定</title>
</head>

<body>
    <div id="app">
        <!-- v-bind:属性 -->
        <a v-bind:href="url">百度2</a>
        <!-- :属性  简写形式 -->
        <a :href="url">百度2</a>
        <!--  -->
        <button @click="handle">切换</button>
    </div>

    <script type="text/javascript" src="js/vue.js"></script>
    <script type="text/javascript">
        var vm = new Vue({
            el: '#app',
            data: {
                url: 'http://www.baidu.com'
            },
            methods: {
                handle: function () {
                    this.url = 'https://www.jd.com/';
                }
            }
        });
    </script>
</body>

</html>